package com.sas.domain;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.OneToMany;

import org.springframework.util.Assert;

@Entity
public class Client extends Subject {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1408412054028419113L;
	
	@OneToMany(mappedBy = "client")
	private Set<Flow> history;
	
	public Client () {
		super();
	}

	public Client(String cuilCuit, String name, String description,
			String email, Address address, Telephone telephone,
			Telephone alternative, Telephone fax, Telephone cellphone) {
		setCuilCuit(cuilCuit);
		setName(name);
		setDescription(description);
		setEmail(email);
		setAddress(address);
		setTelephone(telephone);
		setAlternative(alternative);
		setFax(fax);
		setCellphone(cellphone);
	}

	public void setHistory(Set<Flow> history) {
		Assert.notNull(history);
		this.history = history;
	}

	public Set<Flow> getHistory() {
		return history;
	}
}
